package com.sayice.robotconflict.util

import com.google.gson.Gson
import com.google.gson.GsonBuilder

val GSON = Gson()

val PRETTY_GSON = GsonBuilder().setPrettyPrinting().create()

inline fun <reified T> Map<String, *>.toBean(): T {
    val json = GSON.toJson(this)
    return GSON.fromJson(json, T::class.java)
}